added content type option to email digest

Judy Ngai 9 years ago
parent
commit
1481d50b05
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/models/agents/email_digest_agent.rb

+ 5 - 0
app/models/agents/email_digest_agent.rb

@@ -18,6 +18,10 @@ module Agents
18 18
 
19 19
       You can provide a `from` address for the email, or leave it blank to default to the value of `EMAIL_FROM_ADDRESS` (`#{ENV['EMAIL_FROM_ADDRESS']}`).
20 20
 
21
+      You can provide a `content_type` for the email and specify `text/plain` or `text/html` to be sent.
22
+
23
+      If you do not specify `content_type`, then the recipient email server will determine the correct rendering.
24
+
21 25
       Set `expected_receive_period_in_days` to the maximum amount of time that you'd expect to pass between Events being received by this Agent.
22 26
     MD
23 27
 
@@ -49,6 +53,7 @@ module Agents
49 53
             from: interpolated['from'],
50 54
             subject: interpolated['subject'],
51 55
             headline: interpolated['headline'],
56
+            content_type: interpolated['content_type'],
52 57
             groups: groups
53 58
           ).deliver_later
54 59
         end